﻿@{
    ViewBag.Title = "RenderIconLookup";
    Layout = null;
}
<!--选择图标dialog-->
<div id="@ViewBag.Id" class="easyui-dialog" style="width:515px;height:200px;padding:10px"
     data-options="closed:true,iconCls: 'icon-page_paintbrush'">
    @foreach (var item in ViewBag.Icons as IEnumerable<string>)
    {
        <span class="icon @item" style="width: 20px; height: 20px; display: inline-block;cursor: pointer;" data-icon="@item"></span>
    }
    <input type="hidden" class="dialog-value" />
    <input type="hidden" class="dialog-text" />
</div>
<script>
    $(function () {
        $('#@ViewBag.Id').find('.icon').click(function () {
            $('#@ViewBag.Id').find('.dialog-value').val($(this).data('icon'));
            $('#@ViewBag.Id').find('.dialog-text').val($(this).data('icon'));
            $('#@ViewBag.Id').dialog('close');
        });
    });
</script>
<!--/选择图标dialog-->
